Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rint intrinsics: caution against actually trying to check for floating-point exceptions #119782

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Jan 9, 2024

No description provided.

@rustbot
Copy link
Collaborator

rustbot commented Jan 9, 2024

r? @cuviper

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 9, 2024
@cuviper
Copy link
Member

cuviper commented Jan 10, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 10, 2024

📌 Commit fa5bef8 has been approved by cuviper

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 10, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 10, 2024
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#106893 (Explain base expression for struct update syntax)
 - rust-lang#119769 (rustdoc: offset generic args of cross-crate trait object types when cleaning)
 - rust-lang#119772 (Fix an ICE that occurs after an error has already been reported)
 - rust-lang#119782 (rint intrinsics: caution against actually trying to check for floating-point exceptions)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3fcddf1 into rust-lang:master Jan 10, 2024
11 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 10, 2024
Rollup merge of rust-lang#119782 - RalfJung:rint, r=cuviper

rint intrinsics: caution against actually trying to check for floating-point exceptions
@rustbot rustbot added this to the 1.77.0 milestone Jan 10, 2024
@@ -1787,6 +1787,8 @@ extern "rust-intrinsic" {
/// so this rounds half-way cases to the number with an even least significant digit.
///
/// May raise an inexact floating-point exception if the argument is not an integer.
/// However, Rust assumes floating-point exceptions cannot be observed, so this is not something that
Copy link
Member

@nagisa nagisa Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somewhat ambiguous what "this" in "this is not something that can actually be used" is. Is it this intrinsic itself? Or the very fact that the exceptions might be raised and you cannot utilize this fact for anything?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was clear to me that "this" meant the raised exception, but we can always tweak it further!

@RalfJung RalfJung deleted the rint branch January 11, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants